﻿/// <reference path="../../../../Scripts/jqGrid/jqGrid-4.6.0/i18n/grid.locale-en.js" />
/// <reference path="../../../../Scripts/jqGrid/jqGrid-4.6.0/jquery.jqGrid.src.js" />
/// <reference path="../../../../Scripts/jQuery/jquery-1.11.0.js" />
/// <reference path="../../../../Scripts/jQuery-UI/jquery-ui-1.10.4.custom.js" />
/// <reference path="../../../../Scripts/vpGrid/vpGrid-0.6.9.js" />



(function (window, $, vpGrid, undefined) {

    var MyCompany = window.MyCompany || {};
    MyCompany.MyGrid = MyCompany.MyGrid || {};
    var MyGrid = MyCompany.MyGrid;

    try {

        MyGrid.init = function () {
            try {
                vpGrid.registerEventHandler(vpGrid.Event.onSelectCellRendering,
                                        MyGrid.onSelectCellRenderingEventHandler);


            } catch (e) {
                vpGrid.logException(e);
            }
        };

        // Event Handlers
        MyGrid.onSelectCellRenderingEventHandler = function (source, eventArgs) {
            try {

            } catch (e) {
                vpGrid.logException(e);
            }
        };

        // end event handlers



        //modal-dialog handlers
        MyGrid.loadDialogToBeDone = function () {
            try {
                var selector = "div[role=vpgrid-modal-dialog][data-vpgrid-dialog-id=ToBeDone]";
                //$(selector).dialog('open');
                $(selector).openClientSideDialog();
            } catch (e) {

            }

        };
        //end modal-dialog handlers



    } catch (e) {
        vpGrid.logException(e);
    }
    finally {
        window.MyCompany = MyCompany;
    }

})(this, jQuery, vpGrid);
